﻿using System;
using System.Web;
using System.Collections.Generic;
using System.Text;
using System.Web.UI;

namespace Enterprise.Modules
{
    public abstract class ModuleBase : UserControl
    {
        
        /// <summary>
        /// If the module has administration
        /// </summary>
        public abstract bool HasAdminView
        {
            get;
        }
        
        public abstract string InfoUrl
        {
            get;
        }

        public abstract IModule Module
        {
            set;
            get;
        }

        public ViewMode ViewMode
        {
            get
            {
                object o = ViewState["ViewMode"];
                if (o != null)
                    return (ViewMode)o;
                else
                    return ViewMode.Readonly;
            }
            set
            {
                ViewState["ViewMode"] = value;
            }
        }
    }
}
